package cn.gzy.studentsociety.web;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

@WebServlet(name = "student",urlPatterns = "/student/*")
public class StudentServlet extends HttpServlet {
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String account = request.getParameter("account");
        String password = request.getParameter("password");
        PrintWriter out = response.getWriter();
        out.write("<html><body>"+"<h1>account:"+account+"<br/>password:"+password+"</h1>"+"</body></html>");
        out.flush();
        out.close();
    }
}
